package org.demo.warehouse.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.demo.warehouse.common.pojo.User;
import org.demo.warehouse.common.pojo.Warehouse;
import org.demo.warehouse.common.utils.PageParam;
import org.demo.warehouse.common.utils.R;
import org.demo.warehouse.service.IWarehouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zgc
 * @since 2021-12-16
 */
@RestController
@RequestMapping("/warehouse")
public class WarehouseController extends AbstractController<Warehouse>{
    @Autowired
    private IWarehouseService warehouseService;

    @Override
    public R page(PageParam param) {
        return R.ok(warehouseService.pageVo(new Page<>(param.getPage(), param.getLimit()), param.getWrapper()));
    }
}

